/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sys.screen;

import java.io.*;
import java.text.NumberFormat;
import java.util.List;
import javax.swing.UIManager;
import javax.swing.table.DefaultTableModel;
import org.ini4j.Ini;
import org.ini4j.Wini;
import sys.bean.ParametrosBean;
import sys.dao.ParametrosDao;
import sys.utils.LetterUpper;
import sys.utils.Mensagens;
import sys.utils.Utils;
import static sys.utils.Utils.desocultar;
import static sys.utils.Utils.dirFileConfig;
import static sys.utils.Utils.dirFileTraco;
import static sys.utils.Utils.escClose;
import static sys.utils.Utils.numParaCalculos;

public class UIParametros extends javax.swing.JDialog {

    public int sessao = 0; //Se sessao for 0 esta vindo da tela de login, se for 1 esta vindo da tela principal
    String blocoSelecionado = ""; // pegando linha selecionada na tabela
    int tipo = 0; // para saber qual tipo de transação - 0 Incluir - 1 alterar
    String serial = "";
    String situacao = "";
    NumberFormat formatoMoeda = NumberFormat.getCurrencyInstance();
    Ini ini = null;
    Wini wini = null;

    public UIParametros() {
        initComponents();
    }

    public UIParametros(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        setLocationRelativeTo(null);
        aTabela();
        btnSalvar.setEnabled(false);
        btnAlterar.setEnabled(false);
        btnExcluir.setEnabled(false);
        UIManager.put("Table.alternateRowColor", new java.awt.Color(230, 255, 255));
        desocultar();
        escClose(this);
    }

    public UIParametros(java.awt.Dialog parent, boolean modal) {
        super(parent, modal);
        initComponents();
        setLocationRelativeTo(null);
        sessao = 1;
        aTabela();
        btnSalvar.setEnabled(false);
        btnAlterar.setEnabled(false);
        btnExcluir.setEnabled(false);
        UIManager.put("Table.alternateRowColor", new java.awt.Color(230, 255, 255));
        desocultar();
        escClose(this);
    }

    private void atualizaConfEmpresa() {
        atuConfigEmpresa(tabela.getValueAt(tabela.getSelectedRow(), 0).toString());

        btnAlterar.setEnabled(true);
        btnExcluir.setEnabled(true);
        btnNovo.setEnabled(true);
        btnSalvar.setEnabled(false);

        txDescricao.setEditable(false);
        txServerIp.setEditable(false);
        txDirSpac.setEditable(false);
        txPorta.setEditable(false);

        txMetaEmpresa.setEditable(false);
        txMetaVendedor.setEditable(false);
        txDiasUteis.setEditable(false);
        txUserMysql.setEditable(false);
        txSenhaMysql.setEditable(false);

        rbSomenteVendedor.setEnabled(false);
        rbTodos.setEnabled(false);
    }

    //opção utilizada quando botão nova empresa é selecionado.
    private void opcNovo() {

        txDescricao.requestFocus();
        txDescricao.setText("");
        txServerIp.setText("");
        txDirSpac.setText("C:/SPAC/EMP??");
        txPorta.setText("6262");
        txMetaVendedor.setText("30000.00");
        txMetaEmpresa.setText("100000.00");
        txDiasUteis.setText("25");
        txUserMysql.setText("root");
        txSenhaMysql.setText("local");

        btnNovo.setEnabled(false);
        btnAlterar.setEnabled(false);
        btnExcluir.setEnabled(false);
        btnSalvar.setEnabled(true);

        txDescricao.setEditable(true);
        txServerIp.setEditable(true);
        txDirSpac.setEditable(true);
        txPorta.setEditable(true);
        txMetaVendedor.setEditable(true);
        txMetaEmpresa.setEditable(true);
        txDiasUteis.setEditable(true);

        txUserMysql.setEditable(true);
        txSenhaMysql.setEditable(true);

        rbTodos.setEnabled(true);
        rbSomenteVendedor.setEnabled(true);

        rbTodos.setSelected(true);
        rbSomenteVendedor.setSelected(false);

    }

    private void aTabela() {

        DefaultTableModel modelo = (DefaultTableModel) tabela.getModel();
        modelo.setNumRows(0);
        try {
            List<ParametrosBean> listaDados = ParametrosDao.listaDadosEmpresas();
            for (ParametrosBean pb : listaDados) {
                modelo.addRow(new Object[]{
                    pb.getBloco(), pb.getDescricao(), pb.getServer_ip(), pb.getDirectory(), pb.getPort()
                });
            }
        } catch (IOException ex) {
            Mensagens.msgErro("erro\n" + ex.getMessage());
        }

    }

    private void excluirDados() {
        try {
            ini = new Ini(new FileInputStream(new File(dirFileConfig())));
            String bloco = tabela.getValueAt(tabela.getSelectedRow(), 0).toString();
            if (ini.containsKey(bloco)) {
                ini.remove(ini.get(bloco));
            }
            ini.store(new FileOutputStream(new File(dirFileConfig())));
        } catch (IOException x) {
            Mensagens.msgErro("erro\n" + x.getMessage());
        }
    }

    private void salvar() {
        try {
            wini = new Wini();
            String dir = dirFileConfig();
            File iniFile = new File(dir);

            wini.load(iniFile);

            wini.add("[" + txDescricao.getText() + "]\n");
            wini.add(txDescricao.getText(), "descricao", txDescricao.getText());
            wini.add(txDescricao.getText(), "directory", txDirSpac.getText());
            wini.add(txDescricao.getText(), "port", txPorta.getText());
            wini.add(txDescricao.getText(), "server/ip", txServerIp.getText());
            wini.add(txDescricao.getText(), "diasUteis", txDiasUteis.getText());
            wini.add(txDescricao.getText(), "metaVendedor", numParaCalculos(txMetaVendedor.getText()));
            wini.add(txDescricao.getText(), "metaEmpresa", numParaCalculos(txMetaEmpresa.getText()));

            if (rbTodos.isSelected()) {
                wini.add(txDescricao.getText(), "exibirGrafico", "");
            }
            if (rbSomenteVendedor.isSelected()) {
                wini.add(txDescricao.getText(), "exibirGrafico", "005");
            }

            wini.add(txDescricao.getText(), "userMySQL", txUserMysql.getText());
            wini.add(txDescricao.getText(), "senhaMySQL", txSenhaMysql.getText());

            wini.store(iniFile);

        } catch (IOException ex) {
            Mensagens.msgErro("erro\n" + ex.getMessage());
        }
    }

    //validação dos campos
    private boolean validaCampos() {
        boolean v = true;
        String txt = "verifique os seguintes campos:\n";

        if (txDescricao.getText().equals("")) {
            txt += "descricao (vazio);\n";
            v = false;
            txDescricao.requestFocus();
        }

        if (txServerIp.getText().equals("")) {
            txt += "server/ip (vazio);\n";
            v = false;
            txServerIp.requestFocus();
        }

//        try {
//            if (!txServerIp.getText().equals("")) {
//                int server = Integer.parseInt(txServerIp.getText());
//            }
//        } catch (NumberFormatException e) {
//            txt += "recomendamos utilizar IP ao invés do nome do servidor\n";
//        }
        if (txDirSpac.getText().equals("")) {
            txt += "diretorio da base spac (vazio);\n";
            v = false;
            txDirSpac.requestFocus();
        }
        if (!txDirSpac.getText().equals("")) {
            if (txDirSpac.getText().length() > 2 && txDirSpac.getText().substring(txDirSpac.getText().length() - 2).equals("??")) {
                txt += "informar a empresa (01,91);\n";
                v = false;
                txDirSpac.requestFocus();
            }
            if (!txDirSpac.getText().contains("/")) {
                txt += "diretorio (invalido);\n";
                v = false;
                txDirSpac.requestFocus();
            }

        }

        if (txPorta.getText().equals("")) {
            txt += "porta (vazio);\n";
            v = false;
            txPorta.requestFocus();
        }

        try {
            if (!txPorta.getText().equals("")) {
                int porta = Integer.parseInt(txPorta.getText());
            }
        } catch (NumberFormatException e) {
            txt += "porta (deve ser um numero inteiro);\n";
            v = false;
        }

        if (txMetaVendedor.getText().equals("")) {
            txt += "meta mensal por vendedor (vazio);\n";
            v = false;
            txMetaVendedor.requestFocus();
        }
        if (txMetaEmpresa.getText().equals("")) {
            txt += "meta mensal da empresa (vazio);\n";
            v = false;
            txMetaEmpresa.requestFocus();
        }
        if (txDiasUteis.getText().equals("")) {
            txt += "dias úteis (vazio);\n";
            v = false;
            txDiasUteis.requestFocus();
        }

        if (!rbSomenteVendedor.isSelected() && !rbTodos.isSelected()) {
            txt += "selecione ao menos uma opção de exibição nos gráficos;\n";
            v = false;
            jTabbedPane1.setSelectedIndex(1);
        }

        if (txUserMysql.getText().equals("")) {
            txt += "usuário mysql (vazio);\n";
            v = false;
            txUserMysql.requestFocus();
        }

        if (v == false) {
            Mensagens.msgAtencao(txt);
        }
        return v;
    }

    /*
     * metodo utilizado para pegar os dados da tabela e setar nos campos de
     * texto
     */
    private void atuConfigEmpresa(String bloco) {
        try {
            ini = new Ini(new FileInputStream(new File(dirFileConfig())));

            for (int i = 0; i < tabela.getColumnCount(); i++) {
                txDescricao.setText(tabela.getValueAt(tabela.getSelectedRow(), 1).toString());
                txServerIp.setText(tabela.getValueAt(tabela.getSelectedRow(), 2).toString());
                txDirSpac.setText(tabela.getValueAt(tabela.getSelectedRow(), 3).toString());
                txPorta.setText(tabela.getValueAt(tabela.getSelectedRow(), 4).toString());

                txDiasUteis.setText(ini.get(bloco, "diasUteis"));
                txMetaVendedor.setText(formatoMoeda.format(Double.parseDouble(ini.get(bloco, "metaVendedor"))));
                txMetaEmpresa.setText(formatoMoeda.format(Double.parseDouble(ini.get(bloco, "metaEmpresa"))));

                if (ini.get(bloco, "exibirGrafico").equals("")) {
                    rbTodos.setSelected(true);
                    rbSomenteVendedor.setSelected(false);
                }
                if (ini.get(bloco, "exibirGrafico").equals("005")) {
                    rbTodos.setSelected(false);
                    rbSomenteVendedor.setSelected(true);
                }

                txUserMysql.setText(ini.get(bloco, "userMySQL"));
                txSenhaMysql.setText(ini.get(bloco, "senhaMySQL"));
            }
        } catch (IOException ex) {
            Mensagens.msgErro("erro\n" + ex.getMessage());
        }

    }

    public void alteraConfig() {
        try {
            wini = new Wini();
            String dir = dirFileConfig();
            File iniFile = new File(dir);

            wini.load(iniFile);

            wini.add(blocoSelecionado, "descricao", txDescricao.getText());
            wini.add(blocoSelecionado, "directory", txDirSpac.getText());
            wini.add(blocoSelecionado, "port", txPorta.getText());
            wini.add(blocoSelecionado, "server/ip", txServerIp.getText());

            wini.add(blocoSelecionado, "metaVendedor", numParaCalculos(txMetaVendedor.getText()));
            wini.add(blocoSelecionado, "metaEmpresa", numParaCalculos(txMetaEmpresa.getText()));
            wini.add(blocoSelecionado, "diasUteis", txDiasUteis.getText());

            if (rbTodos.isSelected()) {
                wini.add(blocoSelecionado, "exibirGrafico", "");
            }

            if (rbSomenteVendedor.isSelected()) {
                wini.add(blocoSelecionado, "exibirGrafico", "005");
            }

            wini.add(blocoSelecionado, "userMySQL", txUserMysql.getText());
            wini.add(blocoSelecionado, "senhaMySQL", txSenhaMysql.getText());

            wini.store(iniFile);

        } catch (IOException x) {
            Mensagens.msgErro("erro\n" + x.getMessage());
        }
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel2 = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tabela = new javax.swing.JTable();
        jLabel8 = new javax.swing.JLabel();
        txDescricao = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        txServerIp = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        txPorta = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        txDirSpac = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        txUserMysql = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        txSenhaMysql = new javax.swing.JPasswordField();
        jPanel4 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jLabel15 = new javax.swing.JLabel();
        txMetaEmpresa = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        txDiasUteis = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        txMetaVendedor = new javax.swing.JTextField();
        jpMostrarGraficos = new javax.swing.JPanel();
        rbSomenteVendedor = new javax.swing.JRadioButton();
        rbTodos = new javax.swing.JRadioButton();
        jPanel6 = new javax.swing.JPanel();
        btnNovo = new javax.swing.JButton();
        btnSalvar = new javax.swing.JButton();
        btnAlterar = new javax.swing.JButton();
        btnExcluir = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("MANUTENÇÃO DE PARÂMETROS");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                sair(evt);
            }
        });

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));

        jTabbedPane1.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));

        tabela.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        tabela.setForeground(new java.awt.Color(0, 51, 204));
        tabela.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "BLOCO", "DESCRICAO", "SERVIDOR", "BASE SPAC", "PORTA"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tabela.setGridColor(new java.awt.Color(204, 204, 204));
        tabela.getTableHeader().setReorderingAllowed(false);
        tabela.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tabelaMouseClicked(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                tabelaMousePressed(evt);
            }
        });
        tabela.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tabelaKeyReleased(evt);
            }
        });
        jScrollPane1.setViewportView(tabela);
        if (tabela.getColumnModel().getColumnCount() > 0) {
            tabela.getColumnModel().getColumn(0).setMinWidth(0);
            tabela.getColumnModel().getColumn(0).setPreferredWidth(0);
            tabela.getColumnModel().getColumn(0).setMaxWidth(0);
            tabela.getColumnModel().getColumn(2).setPreferredWidth(50);
            tabela.getColumnModel().getColumn(3).setPreferredWidth(100);
            tabela.getColumnModel().getColumn(4).setPreferredWidth(25);
        }

        jLabel8.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel8.setText("DESCRICAO:");

        txDescricao.setDocument(new LetterUpper());
        txDescricao.setEditable(false);
        txDescricao.setBackground(new java.awt.Color(245, 245, 245));
        txDescricao.setFont(new java.awt.Font("Calibri", 1, 12)); // NOI18N
        txDescricao.setForeground(new java.awt.Color(0, 51, 255));
        txDescricao.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txDescricao.setBorder(null);

        jLabel2.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel2.setText("IP SERVIDOR:");

        txServerIp.setDocument(new LetterUpper());
        txServerIp.setEditable(false);
        txServerIp.setBackground(new java.awt.Color(245, 245, 245));
        txServerIp.setFont(new java.awt.Font("Calibri", 1, 12)); // NOI18N
        txServerIp.setForeground(new java.awt.Color(0, 51, 255));
        txServerIp.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txServerIp.setBorder(null);

        jLabel4.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel4.setText("PORTA ADS:");

        txPorta.setEditable(false);
        txPorta.setBackground(new java.awt.Color(245, 245, 245));
        txPorta.setFont(new java.awt.Font("Calibri", 1, 12)); // NOI18N
        txPorta.setForeground(new java.awt.Color(0, 51, 255));
        txPorta.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txPorta.setBorder(null);

        jLabel3.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel3.setText("DIR. DA BASE SPAC:");

        txDirSpac.setDocument(new LetterUpper());
        txDirSpac.setEditable(false);
        txDirSpac.setBackground(new java.awt.Color(245, 245, 245));
        txDirSpac.setFont(new java.awt.Font("Calibri", 1, 12)); // NOI18N
        txDirSpac.setForeground(new java.awt.Color(0, 51, 255));
        txDirSpac.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txDirSpac.setBorder(null);
        txDirSpac.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txDirSpacKeyReleased(evt);
            }
        });

        jLabel5.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel5.setText("USUARIO MySQL:");

        txUserMysql.setEditable(false);
        txUserMysql.setBackground(new java.awt.Color(245, 245, 245));
        txUserMysql.setFont(new java.awt.Font("Calibri", 1, 12)); // NOI18N
        txUserMysql.setForeground(new java.awt.Color(0, 51, 255));
        txUserMysql.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txUserMysql.setBorder(null);

        jLabel6.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel6.setText("SENHA MySQL:");

        txSenhaMysql.setBackground(new java.awt.Color(245, 245, 245));
        txSenhaMysql.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        txSenhaMysql.setForeground(new java.awt.Color(0, 51, 255));
        txSenhaMysql.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txSenhaMysql.setBorder(null);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 449, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txDescricao)
                            .addComponent(txPorta)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel8)
                                    .addComponent(jLabel4))
                                .addGap(0, 0, Short.MAX_VALUE)))
                        .addGap(10, 10, 10)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel3)
                            .addComponent(jLabel2)
                            .addComponent(txServerIp)
                            .addComponent(txDirSpac, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel6)
                            .addComponent(jLabel5)
                            .addComponent(txUserMysql, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE)
                            .addComponent(txSenhaMysql))))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txDescricao, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txServerIp, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txDirSpac, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txPorta, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addComponent(txSenhaMysql, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txUserMysql, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel6)
                        .addGap(28, 28, 28)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("PARAMETROS DE CONEXAO", new javax.swing.ImageIcon(getClass().getResource("/sys/picture/lan.png")), jPanel1); // NOI18N

        jPanel5.setBackground(new java.awt.Color(255, 255, 255));

        jLabel15.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel15.setText("META MENSAL EMPRESA:");

        txMetaEmpresa.setEditable(false);
        txMetaEmpresa.setBackground(new java.awt.Color(245, 245, 245));
        txMetaEmpresa.setFont(new java.awt.Font("Calibri", 1, 12)); // NOI18N
        txMetaEmpresa.setForeground(new java.awt.Color(0, 51, 255));
        txMetaEmpresa.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txMetaEmpresa.setToolTipText("Quantidade maxima de vendedores que o gráfico de rentabilidade vai exibir.");
        txMetaEmpresa.setBorder(null);
        txMetaEmpresa.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txMetaEmpresaKeyReleased(evt);
            }
        });

        jLabel17.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel17.setText("DIAS ÚTEIS DO MÊS:");

        txDiasUteis.setEditable(false);
        txDiasUteis.setBackground(new java.awt.Color(245, 245, 245));
        txDiasUteis.setFont(new java.awt.Font("Calibri", 1, 12)); // NOI18N
        txDiasUteis.setForeground(new java.awt.Color(0, 51, 255));
        txDiasUteis.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txDiasUteis.setToolTipText("Quantidade maxima de vendedores que o gráfico de rentabilidade vai exibir.");
        txDiasUteis.setBorder(null);

        jLabel18.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel18.setText("META MENSAL VENDEDOR:");

        txMetaVendedor.setEditable(false);
        txMetaVendedor.setBackground(new java.awt.Color(245, 245, 245));
        txMetaVendedor.setFont(new java.awt.Font("Calibri", 1, 12)); // NOI18N
        txMetaVendedor.setForeground(new java.awt.Color(0, 51, 255));
        txMetaVendedor.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txMetaVendedor.setToolTipText("Quantidade maxima de vendedores que o gráfico de vendas vai exibir.");
        txMetaVendedor.setBorder(null);
        txMetaVendedor.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txMetaVendedorKeyReleased(evt);
            }
        });

        jpMostrarGraficos.setBackground(new java.awt.Color(255, 255, 255));
        jpMostrarGraficos.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "EXIBIR NOS GRÁFICOS:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 0, 10))); // NOI18N

        rbSomenteVendedor.setBackground(new java.awt.Color(255, 255, 255));
        rbSomenteVendedor.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        rbSomenteVendedor.setText("SOMENTE VENDEDOR");
        rbSomenteVendedor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbSomenteVendedorActionPerformed(evt);
            }
        });

        rbTodos.setBackground(new java.awt.Color(255, 255, 255));
        rbTodos.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        rbTodos.setText("TODOS");
        rbTodos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbTodosActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpMostrarGraficosLayout = new javax.swing.GroupLayout(jpMostrarGraficos);
        jpMostrarGraficos.setLayout(jpMostrarGraficosLayout);
        jpMostrarGraficosLayout.setHorizontalGroup(
            jpMostrarGraficosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpMostrarGraficosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jpMostrarGraficosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(rbSomenteVendedor, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(rbTodos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(21, Short.MAX_VALUE))
        );
        jpMostrarGraficosLayout.setVerticalGroup(
            jpMostrarGraficosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpMostrarGraficosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(rbTodos)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(rbSomenteVendedor)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jpMostrarGraficos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(txMetaEmpresa)
                    .addComponent(jLabel15, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel17)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel18))
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(jPanel5Layout.createSequentialGroup()
                            .addGap(1, 1, 1)
                            .addComponent(txDiasUteis))
                        .addComponent(txMetaVendedor, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(151, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel18)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txMetaVendedor, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel15)
                        .addGap(28, 28, 28))
                    .addComponent(txMetaEmpresa, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txDiasUteis, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jpMostrarGraficos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(132, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("PARAMETROS DE VENDA", new javax.swing.ImageIcon(getClass().getResource("/sys/picture/clipboard.png")), jPanel4, ""); // NOI18N

        jPanel6.setBackground(new java.awt.Color(245, 245, 245));
        jPanel6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));

        btnNovo.setFont(new java.awt.Font("Calibri", 0, 13)); // NOI18N
        btnNovo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sys/picture/new.png"))); // NOI18N
        btnNovo.setText("NOVO");
        btnNovo.setPreferredSize(new java.awt.Dimension(100, 30));
        btnNovo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNovoActionPerformed(evt);
            }
        });
        jPanel6.add(btnNovo);

        btnSalvar.setFont(new java.awt.Font("Calibri", 0, 13)); // NOI18N
        btnSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sys/picture/salvar.png"))); // NOI18N
        btnSalvar.setText("SALVAR");
        btnSalvar.setPreferredSize(new java.awt.Dimension(100, 30));
        btnSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalvarActionPerformed(evt);
            }
        });
        jPanel6.add(btnSalvar);

        btnAlterar.setFont(new java.awt.Font("Calibri", 0, 13)); // NOI18N
        btnAlterar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sys/picture/edit.png"))); // NOI18N
        btnAlterar.setText("ALTERAR");
        btnAlterar.setPreferredSize(new java.awt.Dimension(100, 30));
        btnAlterar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAlterarActionPerformed(evt);
            }
        });
        jPanel6.add(btnAlterar);

        btnExcluir.setFont(new java.awt.Font("Calibri", 0, 13)); // NOI18N
        btnExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sys/picture/delete.png"))); // NOI18N
        btnExcluir.setText("EXCLUIR");
        btnExcluir.setPreferredSize(new java.awt.Dimension(100, 30));
        btnExcluir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExcluirActionPerformed(evt);
            }
        });
        jPanel6.add(btnExcluir);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTabbedPane1)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 292, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalvarActionPerformed

        if (tipo == 0) {
            if (validaCampos()) {
                salvar();
                aTabela();
                btnAlterar.setEnabled(false);
                btnExcluir.setEnabled(false);
                btnNovo.setEnabled(true);
                btnSalvar.setEnabled(false);

                txDescricao.setEditable(false);
                txServerIp.setEditable(false);
                txDirSpac.setEditable(false);
                txPorta.setEditable(false);

                txMetaEmpresa.setEditable(false);
                txMetaVendedor.setEditable(false);
                txDiasUteis.setEditable(false);
                txUserMysql.setEditable(false);
                txSenhaMysql.setEditable(false);

                rbSomenteVendedor.setEnabled(false);
                rbTodos.setEnabled(false);
            }

        } else {
            if (validaCampos()) {
                alteraConfig();
                aTabela();
                btnAlterar.setEnabled(false);
                btnExcluir.setEnabled(false);
                btnNovo.setEnabled(true);
                btnSalvar.setEnabled(false);

                txDescricao.setEditable(false);
                txServerIp.setEditable(false);
                txDirSpac.setEditable(false);
                txPorta.setEditable(false);
                txUserMysql.setEditable(false);
                txSenhaMysql.setEditable(false);

                txMetaEmpresa.setEditable(false);
                txMetaVendedor.setEditable(false);
                txDiasUteis.setEditable(false);

                rbSomenteVendedor.setEnabled(false);
                rbTodos.setEnabled(false);
            }
        }
    }//GEN-LAST:event_btnSalvarActionPerformed

    private void btnNovoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNovoActionPerformed
        opcNovo();
        tipo = 0;
    }//GEN-LAST:event_btnNovoActionPerformed

    private void tabelaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tabelaKeyReleased
        atuConfigEmpresa(tabela.getValueAt(tabela.getSelectedRow(), 0).toString());
        btnAlterar.setEnabled(true);
        btnExcluir.setEnabled(true);
        btnNovo.setEnabled(true);
        btnSalvar.setEnabled(false);
    }//GEN-LAST:event_tabelaKeyReleased

    private void tabelaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabelaMouseClicked
        atualizaConfEmpresa();
    }//GEN-LAST:event_tabelaMouseClicked

    private void btnAlterarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAlterarActionPerformed

        btnAlterar.setEnabled(false);
        btnExcluir.setEnabled(false);
        btnNovo.setEnabled(false);
        btnSalvar.setEnabled(true);
        txDescricao.setEditable(true);
        txServerIp.setEditable(true);
        txDirSpac.setEditable(true);
        txPorta.setEditable(true);
        txMetaVendedor.setEditable(true);
        txMetaEmpresa.setEditable(true);
        txDiasUteis.setEditable(true);
        txUserMysql.setEditable(true);
        txSenhaMysql.setEditable(true);
        rbSomenteVendedor.setEnabled(true);
        rbTodos.setEnabled(true);

        blocoSelecionado = tabela.getValueAt(tabela.getSelectedRow(), 0).toString();

        tipo = 1;
    }//GEN-LAST:event_btnAlterarActionPerformed

    private void btnExcluirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExcluirActionPerformed
        if (tabela.getRowCount() == 1) {
            Mensagens.msgAtencao("atencao, deve existir ao menos uma conexao com o banco");
        } else {
            if (Mensagens.confirmar(this, "deseja realmente excluir " + tabela.getValueAt(tabela.getSelectedRow(), 0))) {
                excluirDados();
                aTabela();
                txDescricao.setText("");
                txServerIp.setText("");
                txDirSpac.setText("");
                txPorta.setText("");

                txMetaVendedor.setText("");
                txMetaEmpresa.setText("");
                txDiasUteis.setText("");
            }
        }
    }//GEN-LAST:event_btnExcluirActionPerformed

    private void txDirSpacKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txDirSpacKeyReleased
        txDirSpac.setText(txDirSpac.getText().replaceAll("\\\\", "/"));
    }//GEN-LAST:event_txDirSpacKeyReleased

    private void sair(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_sair
        if (sessao == 0) {
            new UILogin().setVisible(true);
            this.dispose();
            Utils.ocultar();
        } else {
            this.dispose();
            Utils.ocultar();
        }
    }//GEN-LAST:event_sair

    private void txMetaEmpresaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txMetaEmpresaKeyReleased
        try {
            txMetaEmpresa.setText(formatoMoeda.format(Double.parseDouble(numParaCalculos(txMetaEmpresa.getText()))));
        } catch (java.lang.ArrayIndexOutOfBoundsException e) {
            //
        }
    }//GEN-LAST:event_txMetaEmpresaKeyReleased

    private void txMetaVendedorKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txMetaVendedorKeyReleased
        try {
            txMetaVendedor.setText(formatoMoeda.format(Double.parseDouble(numParaCalculos(txMetaVendedor.getText()))));
        } catch (java.lang.ArrayIndexOutOfBoundsException e) {
            //
        }
    }//GEN-LAST:event_txMetaVendedorKeyReleased

    private void rbTodosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbTodosActionPerformed
        rbSomenteVendedor.setSelected(false);

    }//GEN-LAST:event_rbTodosActionPerformed

    private void rbSomenteVendedorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbSomenteVendedorActionPerformed
        rbTodos.setSelected(false);

    }//GEN-LAST:event_rbSomenteVendedorActionPerformed

    private void tabelaMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabelaMousePressed
        atualizaConfEmpresa();
    }//GEN-LAST:event_tabelaMousePressed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAlterar;
    private javax.swing.JButton btnExcluir;
    private javax.swing.JButton btnNovo;
    private javax.swing.JButton btnSalvar;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JPanel jpMostrarGraficos;
    private javax.swing.JRadioButton rbSomenteVendedor;
    private javax.swing.JRadioButton rbTodos;
    private javax.swing.JTable tabela;
    private javax.swing.JTextField txDescricao;
    private javax.swing.JTextField txDiasUteis;
    private javax.swing.JTextField txDirSpac;
    private javax.swing.JTextField txMetaEmpresa;
    private javax.swing.JTextField txMetaVendedor;
    private javax.swing.JTextField txPorta;
    private javax.swing.JPasswordField txSenhaMysql;
    private javax.swing.JTextField txServerIp;
    private javax.swing.JTextField txUserMysql;
    // End of variables declaration//GEN-END:variables
}
